package com.zhang;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @title:
 * @author: zhangyifan
 * @date: 2022/6/25 20:53
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    public Integer id;
    public String name;
    public Double score;

    public String toSql() {
        return String.format(
                "insert into user(`id`,`name`,`score`) value(%d,'%s',%f)",
                id,
                name,
                score
                );
    }
}
